package com.cy.mall.comm.exception;

import com.cy.mall.model.enums.ResultCode;
import lombok.Getter;

/**
 * 错误异常
 *
 * @author: tanyilin
 * @create: 2018年10月26日 下午3:17:32
 */
public class MsgException extends RuntimeException{

	private static final long serialVersionUID = 1L;
	
	@Getter
    private ResultCode code;
    @Getter
    private Object value;
    
    public MsgException(String message) {
    	super(message);
    }
    
    public MsgException(String message, ResultCode code) {
        super(message);
        this.code = code;
    }

    public MsgException(String message, ResultCode code, Object value) {
        super(message);
        this.code = code;
        this.value = value;
    }
}
